package cn.jtfadmin.activiti;

import cn.jtfadmin.base.lang.config.module.DefaultModuleInfoDTO;
import cn.jtfadmin.base.lang.config.module.ModuleInfo;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * 启动activiti自动配置类
 */
@Configuration
@ComponentScan(basePackageClasses = ActivitiAutoConfiguration.class)
@EnableJpaRepositories
@EntityScan(basePackageClasses = ActivitiAutoConfiguration.class)
@ServletComponentScan
public class ActivitiAutoConfiguration {

    @Bean
    public ModuleInfo activitiModuleInfo(){
        return new DefaultModuleInfoDTO("activiti", "工作流", "activiti工作流", getClass().getPackage().getName());
    }

}
